// function hello(thing){
//   console.log(this+" say hello "+thing)
// }

// var aaa=hello.call("Yehuda","world")
// console.log(aaa)

// var person = {
//   name: "Brendan Eich",
//   hello: function(thing) {
//    console.log(this + " says hello " + thing);
//   }
//  }
 
//  // this:
// //  person.hello("world")

// person.hello.call(person, "world");


// function hello(thing) {
//   console.log(this + " says hello " + thing);
//  }
 
//  person = { name: "Brendan Eich" }
//  person.hello =hello;
 
//  person.hello("world") // still desugars to person.hello.call(person, "world")
 
//  hello("world") // "[object DOMWindow]world"


var person = {
  name: "Brendan Eich",
  hello: function(thing) {
   console.log(this.name + " says hello " + thing);
  }
 }
 
 var boundHello = function(thing) { return person.hello.call(person, thing); }

 
//  var boundHello = function(thing) { return person.hello(thing); }
 boundHello("world");
 